package com.edu.demo;

import com.edu.data.Contact;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestSpring {
    public static void main(String[] args) {
        ApplicationContext ctx=new ClassPathXmlApplicationContext("classpath:/WEB-INF/applicationContext.xml");//读取配置文件
        Contact contact= (Contact) ctx.getBean("contact");
        System.out.println("班级名称为："+contact.getClassInfo().getName());
    }
}
